package cn.edu.njuit.children.utils;

import java.util.Calendar;
import java.util.Date;

/**
 * @Description: TODO
 * @Data: 2022/12/1 8:15
 * @Author: guzy
 */
public class DateUtil {
    public static int getDatePoor(Long endDate, Long nowDate) {
        String endTime = String.valueOf(endDate);
        if(endTime.length()==10){
            endTime+="000";
        }
        Date date1=new Date(Long.valueOf(endTime));

        String starTime = String.valueOf(nowDate);
        if(starTime.length()==10){
            starTime+="000";
        }
        Date date2=new Date(Long.valueOf(starTime));

        return Math.abs((int) ((date1.getTime() - date2.getTime()) / (1000 * 3600 * 24)));
    }


}
